package ar.edu.uba.fi.jmit.receiver.mock;

import java.util.LinkedList;

import ar.edu.uba.fi.jmit.integrationcommons.Event;
import ar.edu.uba.fi.jmit.receiver.ReceiverObserver;

public class ReceiverObserverMock implements ReceiverObserver {
	
	private LinkedList<Event> recivedEvents = new LinkedList<Event>();

	@Override
	public void onRecivedEvent(Event event) {
		recivedEvents.add(event);
	}
	
	public int getRecivedEventCount() {
		return recivedEvents.size();
	}
	
	public Event getLastEvent() {
		return recivedEvents.getLast();
	}

}
